<?php
global $_GPC, $_W;
$uniacid = $_W['uniacid'];
$id = $_GPC['id'];
$cate_id = $_GPC['cate_id'];
$res = $this->res;
$plus = $this->plus;
load()->func('tpl');
$setting = $this->baseset($uniacid);
$settings = $this->module['config'];
$openid = $_W['openid'];
$userinfo = $this->Get_checkoauth();
if (empty($openid)) {
	$openid = $userinfo['openid'];
}
if (!empty($_GPC['userid'])) {
	$favuser = pdo_fetch("SELECT * FROM " . tablename($this->tableuser) . " WHERE uniacid = '{$_W['uniacid']}' AND id = '{$_GPC['userid']}'");
	if ($favuser) {
		$openid = $favuser['openid'];
	}
}
$allcate = pdo_fetchall("SELECT * FROM " . tablename($this->tablecate) . " WHERE uniacid = '{$_W['uniacid']} ' AND status=1 order by displayorder desc");
$thiscate = pdo_fetch("SELECT * FROM " . tablename($this->tablecate) . " WHERE uniacid = '{$_W['uniacid']}' AND status=1 AND id = '{$cate_id} '");
$_share['title'] = $setting['fxtit'];
$_share['imgUrl'] = tomedia($setting['fxlogo']);
$_share['desc'] = $setting['fxdes'];
$_share['link'] = $_W['siteroot'] . "app/index.php?i=" . $_W['uniacid'] . "&c=entry&do=index&m=bsht_tbk";
$_W['page']['sitename'] = $setting['sitetitle'];
if ($favuser) {
	$pagename = $favuser['nickname'] . ' 的收藏';
} else {
	$pagename = '我的商品收藏';
}
include $this->template('favlist');